/*
 * Copyright (c) 2017 22420103@QQ.COM 版权所有
 */
package com.lehe.dao;

import java.util.List;

import com.lehe.entry.SqlParameterDto;
import com.lehe.entry.UserPayDetailDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.lehe.entry.UserPayDto;

/**
 * 微信公众号-充值记录
 *
 * @author 王丹
 * @since 2017-02-24
 */
@Mapper
public interface PayRecordDao {

	String queryUserPayCount(@Param("userId")Long userId,@Param("btime")String btime,@Param("etime")String etime);
	String queryUserPayCountCount(@Param("userId")Long userId,@Param("btime")String btime,@Param("etime")String etime);
	String queryUserPlayerPayCount(@Param("agentId")Long agentId,@Param("btime")String btime,@Param("etime")String etime);

	String queryUserAngentPayCount(@Param("userId")Long userId,@Param("btime")String btime,@Param("etime")String etime);

	List<UserPayDto> queryUserAngentPayDetail(@Param("userId")Long userId,@Param("btime")String btime,@Param("etime")String etime,@Param("page")Integer page,@Param("pagesize")Integer pagesize);
	Integer queryUserAngentPayDetailCount(@Param("userId")Long userId,@Param("btime")String btime,@Param("etime")String etime);
	List<UserPayDto> queryUserPlayerPayDetail(@Param("agentId")Long agentId,@Param("btime")String btime,@Param("etime")String etime,@Param("page")Integer page,@Param("pagesize")Integer pagesize);
	Integer queryUserPlayerPayDetailCount(@Param("agentId")Long agentId,@Param("btime")String btime,@Param("etime")String etime);
	
	/**
	 * 查询单个用户的充值明细
	 * @param userId
	 * @param btime
	 * @param etime
	 * @param page
	 * @param pagesize
	 * @return
	 */
	List<UserPayDto> queryUserPayDetail(@Param("userId")Long userId,@Param("btime")String btime,@Param("etime")String etime,@Param("page")Integer page,@Param("pagesize")Integer pagesize);
	List<UserPayDetailDto> queryUsersPayDetail(@Param("ids")List<Long> userIds,@Param("btime")String btime,@Param("etime")String etime,@Param("page")Integer page,@Param("pagesize")Integer pagesize);
	Integer queryUserPayDetailCount(@Param("userId")Long userId,@Param("btime")String btime,@Param("etime")String etime);
	Integer queryUsersPayDetailCount(@Param("ids")List<Long> userIds,@Param("btime")String btime,@Param("etime")String etime);
	
	List<UserPayDetailDto> queryPayDetail(SqlParameterDto sqlParameterDto);

	Long queryPayDetailCount(SqlParameterDto sqlParameterDto);
}
